#define _CRT_SECURE_NO_WARNINGS 1
#define _CRT_SECURE_NO_WARNINGS 1
#include <cstddef>
#include <iostream>
#include <string>

using namespace std;

int main()
{
    string s;
    cin >> s;
    int count = 1, ret = 0, n = s.size();

    for (int i = 0; i < n - 1; i++)
    {
        if (s[i] >= '0' && s[i] <= '9')
        {
            ret = ret + (s[i] - '0') * count;
            count++;
        }
    }

    ret %= 11;

    if (ret == s[n - 1] - '0' || (ret == 10 && s[n - 1] == 'X'))
    {
        cout << "Right" << endl;
    }
    else
    {
        s[n - 1] = ret == 10 ? 'X' : ret + '0';
        cout << s << endl;
    }
    return 0;
}